public class test11 {
    public static void main(String[] args) {
        int[] arr = {1,2,5,4,88};
        int ret = SearchMax(arr);
        System.out.println("ret = " + ret);
    }

    //定义方法
    public static int SearchMax(int[] arr){
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] > max){
                max = arr[i];
            }
        }
        return max;
    }
}
